﻿using static Sirius.Help.Help;
using static Sirius.Log.Log;
using Sirius.WebSocket;
using static Sirius.Utils.Util;
using static Sirius.WebSocket.MessageManager.MessagePush;
using Sirius.Application;
using Sirius.SystemDll;
using Sirius.OpenAPI;
using Sirius.Util;

InitSirius();

LoginBot();


SiriusWebSocketClient.SiriusClientConnect();
SiriusWebSocketClient.OnMessage += Message;
//初始化Emoji转义
EmojiFormat.EmojiListInit();

Console.OutputEncoding = System.Text.Encoding.Unicode;
while (true)
{
    Console.WriteLine("输入help查看帮助信息：");
    switch (Console.ReadLine())
    {
        case "help":
            Console.WriteLine("-----------------------------------------------------------");
            help();
            Console.WriteLine("-----------------------------------------------------------");
            LogSuc("Server", "请根据指令进行输入：");
            string select = Console.ReadLine();
            switch (select)
            {
                case "1":
                    showApplicationList();
                    break;
                case "2":
                    showApplicationList();
                    Console.WriteLine("请输入应用ID:");
                    showApplicationMenu(Console.ReadLine());
                    break;
                case "3":
                    if (showApplicationList() == 0)
                        break;
                    Console.WriteLine("请输入应用ID:");
                    removeApplication(int.Parse(Console.ReadLine()));
                    break;
                case "4":
                    loadApplication();
                    break;
                case "5":
                    Console.WriteLine(openAPI.getMessageByMsg_Id("6034803","08d8beb89ca4cae1801d10f3aaf00238c81248c2bef19606"));
                   break;
            }
            break;
    }
}